// Copyright Epic Games, Inc. All Rights Reserved.

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Character.h"
#include "DemoCharacter.generated.h"

class ULineReplicationGraphComponent;
/**
 * 启动核心类
 */
UCLASS()
class LINE_RG_DEMO_API ADemoCharacter : public ACharacter
{
	GENERATED_BODY()

protected:
	ADemoCharacter(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());
protected:
	virtual void Tick(float DeltaSeconds) override;
	virtual void GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLifetimeProps) const override;
protected:
	void DrawDebugInfo() const;
	void TickChangeLineId();
public:
	UFUNCTION(BlueprintCallable)
	void SetId(int32 Value);
	UFUNCTION(BlueprintCallable)
	int32 GetId() const;
protected:
	UPROPERTY(Replicated, VisibleAnywhere, BlueprintReadOnly)
	int32 Id = 0;
	UPROPERTY(Replicated, VisibleAnywhere, BlueprintReadOnly)
	int32 LineId = 0;
	UPROPERTY(Replicated, VisibleAnywhere, BlueprintReadOnly)
	float ChangeInternal = 10;
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FVector DebugInfoStart = FVector();
	UPROPERTY(EditAnywhere, BlueprintReadWrite)
	FVector DebugInfoDelta = FVector();
	UPROPERTY()
	ULineReplicationGraphComponent* LineComponent;
};
